<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
  <!--事件绑定-->
  <button v-on:click="f1()">按钮1</button>
  <button @click="f1()">按钮2</button>
</div>
<script src="../js/vue.js"></script>
<script>

  let v = new Vue({
    el:"body>div",
    data() {
      return {
        info: "事件绑定"
      }
    },
    methods: {  /*vmethod tab键生成这部分代码*/
      f1() {
        alert("f1");
      }
    },
  })  
</script>
</body>
</html>